Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With Consul 0.7.4 supporting a consistent Node ID, it would be nice if Nomad shared its generation of Node IDs with Consul. The following is now true in Consul. Assuming the following output from the start of a Consul agent:
it is now possible to lookup nodes by their Node Name or Node ID, or a
prefix match of the Node ID, with the following caveats re: the prefix
match:
This PR, in effect, applies a similar Node ID creation treatment to Nomad and as a result solves the UX issue where a Nomad Node ID must be passed to
nomad node-status
to find the hostname. The following 3x layers of indirection is a common workflow:With this PR (and an environment running Consul 0.7.4 or newer) both Consul and Nomad will use the same Node ID if the OS presents a system-level UUID. As a result, it is now possible to use the node-id exposed via
nomad status ${job_name}
in service discovery, which enables the following workflow:Updating
resolv.conf(5)
'ssearch
parameter is left as an exercise to the reader.The updates to
shirou/gopsutil
and friends remove a few morecgo
dependencies.